#ifndef UTH_H
#define UTH_H

#include "stm32f10x.h"


//  兼容性命名,增加部分等待类型

#define _scode static uint32_t _l=0;\
                   static uint64_t _ss=0;\
									 uint64_t _sc=0;\
									 switch(_l){case 0: _l=0;
										 
#define _ecode };_l=0; _ss=0; _sc=0;
								 
#define _sleep(time) Sytm_getTickCount(&_ss);_l=_ln; case _ln:\
                         Sytm_getTickCount(&_sc);\
												 if((_sc-_ss)<time) return

#define _wtc(_t)	_l=_ln; case _ln:\
												                if((_t)==0) return												 
#define _wutc(time,_t) Sytm_getTickCount(&_ss);_l=_ln; case _ln:\
                                     Sytm_getTickCount(&_sc);\
												             if(((_sc-_ss)<time)&&((_t)==0)) return
																						

extern void _goes(void);
extern uint32_t _sct(void (*func)(void), uint8_t *name);
extern uint32_t _vks(void);
extern uint64_t _gtk(void);
															 
											

#endif